import platform
import os
import getpass
import platform


adbCMDPath = "adb "
OriginPicDir = 'C:\\Users\{}\Pictures\逍遥安卓照片\\'.format(getpass.getuser())
WorkPath = "E:\\Devlop\\DataSet\\AutoGame\\"
originPath = "E:\\Devlop\\DataSet\\AutoGame\\originTHYJ\\"

ostype = platform.system()
if(ostype == 'Darwin'):
    OriginPicDir = ''
    WorkPath = "/Users/xuwanliang/autogame/"
    originPath = "/Users/xuwanliang/autogame/originTHYJ/"


STATUS_TRY_AGAIN = -4
STATUS_NOTFOUND_DAILY = -3
STATUS_NOTFOUND = -2
STATUS_INCOMPLETE = -1
STATUS_OK = 0
STATUS_ZHANDOU = 1
STATUS_ZHANDOU_SHOUDONG = 2
STATUS_FEIZHANDOU = 3
STATUS_OTHERS = 4

STATUS_FINISHED = 5
STATUS_UNFINISHED = 6
STATUS_GIVEUPTASK = 7
STATUS_HUIYAUNFU = 8
STATUS_ZHANDOUSHIBAI = 9

ZhanDouZiDong = (769, 415, 'ZhanDouZiDong')

openBaoGuo = (766, 351, "openBaoGuo")
closeBaoGuo = (663,  50, "closeBaoGuo")


BaoGuoYe = [
(703, 109, 'BaoGuo1'),
(703, 202, 'BaoGuo2'),
(703, 287, 'BaoGuo3'),
]

#name searchRect clickRect templateRect colorful issearch clickOffsetX clickOffsetY

XianShiTuBiao = (766, 411,'XianShiTuBiao')
Center = (400, 225, 'Center')
#公共行动
publicActions = [
["ZhanDouZiDong",       [755, 400, 780, 424], [755, 400, 780, 424], [755, 400, 780, 424], [1, 0, 0, 0]],  #战斗 自动状态
["ZhanDouShouDong",     [755, 400, 780, 424], [755, 400, 780, 424], [755, 400, 780, 424], [1, 0, 0, 0]],  #战斗 收到状态
["FeiZhanDou",          [754, 335, 778, 373], [754, 335, 778, 373], [754, 335, 778, 373], [1, 0, 0, 0]],  #非战斗，显示包裹图标状态，
["CloseKuang1",         [ 30,  10, 790, 440], [  0,   0,  0,    0], [656,  43, 668,  55], [1, 1, 0, 0]],  #关闭窗口 X
["CloseDuiHua",         [660,   0, 780,  23], [660, 100, 780, 123], [660,   0, 780,  23], [1, 2, 0, 0]],  #剧情对话
["SkipJuQing",          [660,   0, 780,  23], [660, 100, 780, 123], [660,   0, 780,  23], [1, 2, 0, 0]],  #剧情对话
["ZhanDouShiBai",       [367, 266, 451, 291], [367, 266, 451, 291], [367, 266, 451, 291], [1, 0, 0, 0]],  #战斗失败
["ShiYong",             [636, 342, 709, 361], [636, 342, 709, 361], [636, 342, 709, 361], [1, 0, 0, 0]],  #使用物品弹出框，如钱袋、烹饪等
["WuPinLan",            [349,  41, 401,  59], [349,  41, 401,  59], [349,  41, 401,  59], [1, 0, 0, 0]],  #是否为物品栏界面
]

ShangDianActions = [
["LingShouShangDian",   [ -1, 271, 726, 288], [612, 410, 620, 411], [337,  40, 413,  59], [1, 0, 0, 0]],
["ShangJiaoLS",         [ -1, 401, 641, 417], [ -1, 401, 641, 417], [458, 357, 502, 376], [1, 0, 0, 0]],
["NPCShangDian",        [ -1, 400, 708, 418], [577, 393, 577, 393], [366,  38, 434,  56], [1, 0, 0, 0]],
["ShangJiaoWP",         [ -1, 401, 641, 417], [ -1, 401, 641, 417], [378, 326, 422, 344], [1, 0, 0, 0]],
["BaiTan",              [ -1, 400, 708, 418], [ -1, 400, 708, 418], [600, 402, 643, 421], [1, 0, 0, 0]],
]

#日常入口
#模版取活跃下2个像素为y2，高度为30，
InRiChang = (249, 25, 'InRiChang')
closeRiChang = [665, 50, "closeRiChang"]
RiChangSwipe = (400, 300, 400, 180, 'RiChangSwipe')
CloseYouLeChang = (688, 34, 'CloseYouLeChang')
RiChangActions = [
["PinTu",           [224,  60, 291, 440], [100, 100, 100, 100], [240, 210, 276, 240], [1, 1, 100, 0]],
["BaoTu",           [224,  60, 291, 440], [100, 100, 100, 100], [240, 180, 276, 210], [1, 1, 100, 0]],
["SuanGua",         [224,  60, 291, 440], [100, 100, 100, 100], [240, 101, 276, 131], [1, 1, 100, 0]],
["ShiMen",          [224,  60, 291, 440], [100, 100, 100, 100], [240, 239, 276, 269], [1, 1, 100, 0]],
["KeJuXiangShi",    [224,  60, 291, 440], [100, 100, 100, 100], [240, 249, 276, 279], [1, 1, 100, 0]],
["ShiLianChang",    [224,  60, 291, 440], [100, 100, 100, 100], [240, 220, 276, 250], [1, 1, 100, 0]],
["ShiMen",          [224,  60, 291, 440], [100, 100, 100, 100], [240, 239, 276, 269], [1, 1, 100, 0]],
["HuanJing",        [224,  60, 291, 440], [100, 100, 100, 100], [240, 101, 276, 131], [1, 1, 100, 0]],
["TongJi",          [224,  60, 291, 440], [100, 100, 100, 100], [240, 239, 276, 269], [1, 1, 100, 0]],
["LingQu",          [224,  60, 291, 440], [100, 100, 100, 100], [582,  99, 626, 118], [1, 1, 100, 0]],
["QianWang",        [224,  60, 291, 440], [100, 100, 100, 100], [582,  99, 626, 118], [1, 1, 100, 0]],
]

SuanGuaActions = [
["WoYaoSuanGua", [660, 271, 726, 288], [660, 271, 726, 288], [660, 271, 726, 288], [1, 0, 0, 0]],
["SuanGua",      [567, 401, 641, 417], [567, 401, 641, 417], [567, 401, 641, 417], [1, 0, 0, 0]],
["JieShou",      [633, 400, 708, 418], [633, 400, 708, 418], [633, 400, 708, 418], [1, 0, 0, 0]],
["SuanGuoLe",    [ -1, 400, 708, 418], [ -1, 400, 708, 418], [101, 414, 159, 433], [1, 0, 0, 0]],
]

ShiMenActions = [
["KeJieRenWu",     [116, 172, 684, 305], [100, 100, 100, 100], [130, 181, 242, 280], [1, 1, 0, 0]],
["YiWanRenWu",     [116, 172, 684, 305], [100, 100, 100, 100], [130, 181, 242, 280], [1, 1, 0, 0]],
["ChuanShu",       [598,  70, 788, 298], [100, 100, 100, 100], [616, 158, 649, 176], [1, 1, 0, 0]],
["ChuanShuWan",    [ -1,  70, 788, 298], [ -1, 100, 100, 100], [496, 323, 609, 341], [1, 0, 0, 0]],
["JiaoXun",        [ -1,  70, 788, 298], [ -1, 100, 100, 100], [660, 271, 725, 288], [1, 0, 0, 0]],
["ShuaXinShu0",    [643, 142, 653, 158], [ -1, 100, 100, 100], [643, 142, 653, 158], [1, 0, 0, 0]],
["ShuaXinShu1",    [643, 142, 653, 158], [ -1, 100, 100, 100], [643, 142, 653, 158], [1, 0, 0, 0]],
["ShuaXinShu2",    [643, 142, 653, 158], [ -1, 100, 100, 100], [643, 142, 653, 158], [1, 0, 0, 0]],
["ShuaXinShu3",    [643, 142, 653, 158], [ -1, 100, 100, 100], [643, 142, 653, 158], [1, 0, 0, 0]],
]

BaoTuActions = [
['JieRenWu',    [598,  70, 788, 298], [100, 100, 100, 100], [652, 121, 733, 138], [1, 1, 0, 0]],
['DaTuJieShu',  [366, 324, 532, 341], [366, 324, 532, 341], [366, 324, 532, 341], [1, 0, 0, 0]],
['ZhaoBaoTu',   [377,  75, 672, 366], [100, 100, 100, 100], [444, 197, 485, 245], [1, 1, 0, 0]],
['YongBaoTu',   [102, 173, 158, 230], [285, 286, 285, 286], [102, 173, 158, 230], [1, 0, 0, 0]],
['WaBao',       [647, 240, 695, 298], [666, 353, 668, 353], [647, 240, 695, 298], [1, 0, 0, 0]],
['XuanBao',     [369, 209, 428, 282], [561,  63, 562,  64], [369, 209, 428, 282], [1, 0, 0, 0]],
]

#智慧拼图
PinTuActions = [
["KaiShiPinTu", [145, 232, 213, 304], [148, 317, 209, 332], [145, 232, 213, 304], [1, 0, 0, 0]],
["ZhiHuiPinTu", [366,  25, 433,  42], [755, 400, 780, 424], [366,  25, 433,  42], [1, 0, 0, 0]],
["YouXiBi",     [ -1, 371, 606, 384], [ -1, 371, 606, 384], [598, 370, 607, 385], [1, 0, 0, 0]],
]

#试炼场
ShiLianChangActions = [
["JinRuShiLianChang",   [ -1, 232, 213, 304], [ -1, 317, 209, 332], [652, 271, 733, 288], [1, 0, 0, 0]],
["XuanZheDuiShouSL",    [ -1,  25, 433,  42], [665, 222, 667, 224], [714, 414, 788, 432], [1, 0, 0, 0]],
["ShiLianCiShu",        [ -1, 371, 606, 384], [776,  18, 776,  18], [ 43, 416,  52, 430], [1, 0, 0, 0]],
]

#通缉
TongJiActions = [
["LingQuTongJi",    [ -1, 232, 213, 304], [ -1, 317, 209, 332], [644, 271, 742, 288], [1, 0, 0, 0]],
["WeiWanCheng",     [ 58,  40, 740, 380], [755, 400, 780, 424], [193, 248, 256, 326], [1, 1, 0, 0]],
["YiWanCheng",      [ 58,  40, 740, 380], [755, 400, 780, 424], [193,  71, 256, 149], [1, 1, 0, 0]],
["QianWang",        [ -1, 371, 606, 384], [ -1, 371, 606, 384], [521, 314, 563, 333], [1, 0, 0, 0]],
["ShouSi",          [ -1, 371, 606, 384], [ -1, 371, 606, 384], [660, 271, 726, 288], [1, 0, 0, 0]],
["RenWuInList",     [631, 112, 730, 309], [ -1, 371, 606, 384], [631, 173, 730, 189], [1, 1, 0, 0]],

]

HuanJingActions = [
["TouZhi",      [ -1, 232, 213, 304], [422, 388, 424, 388], [313, 367, 348, 408], [1, 0, 0, 0]],
["HJDaTi",      [ -1, 232, 213, 304], [ -1, 424, 388, 388], [366,  45, 435,  63], [1, 0, 0, 0]],
["HJJiangLi",   [ -1, 232, 213, 304], [422, 424, 388, 388], [313, 367, 348, 408], [1, 0, 0, 0]],
]

ZhangHaoKuang = (314, 183, 'ZhangHaoKuang')
MiMaKuang = (314, 235, 'MiMaKuang')
HuanHao = (757, 43, 'HuanHao')
#自动换号
ZhangHaoActions = [
["XiTongIcon",          [697, 393, 722, 434], [697, 393, 722, 434], [697, 393, 722, 434], [1, 0, 0, 0]],
["XiTongJieMian",       [194, 400, 231, 418], [194, 400, 231, 418], [194, 400, 231, 418], [1, 0, 0, 0]],
["QieHuanZhangHao",     [177, 323, 252, 341], [177, 323, 252, 341], [177, 323, 252, 341], [1, 0, 0, 0]],
["GongGao",             [353,  46, 435,  67], [380, 370, 400, 390], [353,  46, 435,  67], [1, 0, 0, 0]],
["DengLuJieMian",       [349, 372, 450, 397], [349, 372, 450, 397], [349, 372, 450, 397], [1, 0, 0, 0]],
["ShuRuJieMian",        [451, 294, 536, 315], [451, 294, 536, 315], [451, 294, 536, 315], [1, 0, 0, 0]],
["KuaiXun",             [361,  30, 440,  50], [678,  45, 678,  45], [361,  30, 440,  50], [1, 0, 0, 0]],
["FuLi",                [361,  30, 440,  50], [678,  45, 678,  45], [362,  40, 438,  60], [1, 0, 0, 0]],
]

def init_path():
    pass

    #print(OriginPicDir)




